package com.yc.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yc.common.core.domain.entity.SysPermission;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

@Repository
public interface SysPermissionMapper extends BaseMapper<SysPermission> {

    /**
     * 根据用户ID查询权限
     */
    Set<String> selectPermissionsByUserId(@Param("userId") Long userId);

    /**
     * 根据角色ID查询权限
     */
    List<String> selectPermissionsByRoleId(@Param("roleId") Long roleId);
}